<?php
// DB Verbindung einbinden..
include 'includes/db_connect.inc.php';

$sql_query = "SELECT * FROM kneipen 
              WHERE Name LIKE '%".$suche."%'
              OR Art LIKE '%".$suche."%'
              OR Kommentar LIKE '%".$suche."%'";

$result = $db_con->query($sql_query);

if ($result === FALSE) {
    trigger_error('Wrong SQL: ' . $sql_query . ' Error: ' . $db_con->error, E_USER_ERROR);
} else {
    $rows_returned = $result->num_rows;
}
$result->data_seek(0);

echo "<table>";
echo "<thead>";
echo "<tr><th>Name</th><th>Art</th><th>Note</th><th>Kommentar</th></tr>";
echo "</thead>";
echo "<tbody>";
while ($row = $result->fetch_assoc()) {
    echo "<tr>";
    echo "<td>" . $row['Name'] . "</td>";
    echo "<td>" . $row['Art'] . "</td>";
    echo "<td>" . $row['Note'] . "</td>";
    echo "<td>" . $row['Kommentar'] . "</td>";
    echo "</tr>";
}
echo "</tbody>";
echo "</table>";
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

